package com.reform.service;

import com.reform.pojo.common.FileInfo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.reform.res.Result;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author mortale
 * @since 2021-07-27
 */
public interface IFileService extends IService<FileInfo> {

    /**
     * 文件上传
     * @param file
     * @return
     */
    Result fileUpload(HttpServletRequest request, MultipartFile[] file);


    /**
     * 文件删除
     * @param fileNames
     * @return
     */
    Result fileDelete(String fileNames);

    /**
     * 文件下载
     * @param fileUrl
     * @return
     */
    Result fileDownload(HttpServletResponse response, String fileUrl, String fileName);
}
